﻿#include "FITKGeoCompPSInterface.h"
#include "FITKPSModelSimpleShape.h"
#include "CSession.h"

#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKGeoInterfaceFactory.h"

//parasolid初始化
static CSession csession;
//static Exchange::FITKPSGo pGo;

namespace PS
{
    FITKGeoCompPSInterface::FITKGeoCompPSInterface()
    {
        Interface::FITKInterfaceGeometryFactory* fac = Interface::FITKInterfaceGeometryFactory::getInstance();
        if (fac == nullptr) return;

        fac->insertCommandCreateFun(Interface::FITKGeoEnum::FGTBox, [&]() {return new FITKPSModelBox; });
        fac->insertCommandCreateFun(Interface::FITKGeoEnum::FGTCylinder, [&]() {return new FITKPSModelCylinder; });
        fac->insertCommandCreateFun(Interface::FITKGeoEnum::FGTSphere, [&]() {return new FITKPSModelSphere; });
    }

    QString FITKGeoCompPSInterface::getComponentName()
    {
        //返回类型名
        return "FITKGeoCompParaSolid";
    }

    bool FITKGeoCompPSInterface::exec(const int indexPort)
    {
        return true;

    }
}